import request from '/@/utils/request';
const headers = {
	onlyData: true,
};

//实施--申报
export const appImplementationSubmit = (data: any) => {
	return request({
		url: `manage/appImplementation/submit`,
		method: 'post',
		data,
		// headers,
	});
};
//实施--保存
export const appImplementationSave = (data: any) => {
	return request({
		url: `manage/appImplementation/save`,
		method: 'post',
		data,
	});
};

//待审报详情信息
export const getImplementationByCode = (params: any) => {
	return request({
		url: `manage/appImplementation/getImplementationByCode`,
		method: 'get',
		params,
		// headers,
	});
};

//审报中详情信息
export const getImplementationIntactByCode = (params: any) => {
	return request({
		url: `manage/appImplementation/getImplementationIntactByCode`,
		method: 'get',
		params,
		// headers,
	});
};

//实施申报列表
export const appImplementationPage = (params: any) => {
	if (params.timeArr) {
		params['startTime'] = params.timeArr[0];
		params['endTime'] = params.timeArr[1];
	}
	delete params.timeArr;
	return request({
		url: `manage/appImplementation/page`,
		method: 'get',
		params,
		// headers,
	});
};

//实施申报删除或者撤销
export const removeImplementation = (params: any) => {
	return request({
		url: `manage/appImplementation/removeImplementation`,
		method: 'delete',
		// headers,
		params,
	});
};

//验收===========
//提交验收
export const checkDataSave = (data: any) => {
	return request({
		url: `manage/checkData/save`,
		method: 'post',
		data,
		// headers,
	});
};
//验收详情
export const checkDataDetail = (params: any) => {
	return request({
		url: `manage/checkData/detail`,
		method: 'get',
		params,
		// headers,
	});
};

//申报审核列表
export const sheVerify = (params: any) => {
	if (params.timeArr) {
		params['startTime'] = params.timeArr[0];
		params['endTime'] = params.timeArr[1];
	}
	delete params.timeArr;
	return request({
		url: `manage/appImplementation/approvePage`,
		method: 'get',
		params,
		// headers,
	});
};

//列表查看流程
export const viewItem = (params: any) => {
	return request({
		url: `task/process-instance/scheduleShow`,
		method: 'get',
		params,
		// headers,
	});
};

//获取区县一级
export const treeAndSelf = (params: any) => {
	return request({
		url: `/admin/dept/treeAndSelf`,
		method: 'get',
		params,
		// headers,
	});
};
